;带报警机制的make-account
(define (make-account balance pswd)
    (define (withdraw amount)
        (if (>= balance amount)
            (begin (set! balance (- balance amount))
                   balance)
            "Insufficient funds"))
    (define (deposit amount)
        (set! balance (+ balance amount))
        balance)
    (define (call-the-cops amount)
        "call the police")
    (let ((count 0))
        (lambda (x y)
            (if (eq? x pswd)
                (begin (set! count 0)
                       (cond ((eq? y 'withdraw) withdraw)
                             ((eq? y 'deposit) deposit)
                             (else (error "Unknown request -- MAKE-ACCOUNT" y))))
                (lambda (x) (begin (set! count (+ count 1))
                                   (if (>= count 7)
                                       (call-the-cops x)
                                       "Insufficient password")))))))